home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC Gamer (Italian) 36
/
PC Gamer IT CD 36 2-2.iso
/
VIGDEMO
/
data1.cab
/
Assets
/
scripts
/
cinema.e
< prev
next >
Wrap
Text File
|
1998-09-21
|
2KB
|
76 lines
int Initialize(string msg) {
global int entity1 = 0;
global int entity2 = 0;
global int entity3 = 0;
global int state = 0;
SetCollidableProperties(thisObject,1,0);
SetStyle(thisObject,5);
TimedEvent(0);
}
int TimedEvent(int msg) {
switch (state) {
case 0:
state = 1;
Wakeup( 3.0 );
break;
case 1:
entity1 = CreateObject( "nikki", "null", -202.0, 180.0, 43.0 );
entity2 = CreateObject( "bluto", "null", -180.4, 180.00, 43.0 );
entity3 = CreateObject("mag_rl","null", 0,0,0 );
state = 2;
Wakeup( 3.0 );
break;
case 2:
// Give weapon to entity
AddObjectTo( entity2, entity3 );
// Move camera here
CameraAttach( entity1 );
// Looks at a specified brain - this works nicely
SeekCamLookAtBrain( entity1, entity2, 15.0 );
// test later
// SeekCamPos( entity1, -180.0 , 180.0 , 43.0, 1.0 );
// testing now
SeekPos( entity2, -195.4, 148.3, 43.0, 5.0 );
//DoJump( entity2 );
DoDraw( entity2 );
state = 3;
Wakeup( 5.0 );
break;
case 3:
print("STATE 3");
DoFire( entity2 );
SeekPos( entity2, -205.0, 148.9, 43.0, 15.0 );
state = 4;
Wakeup( 5.0 );
break;
case 4:
print("state 4");
SeekPos( entity2, -195.4, 148.3, 43.0, 5.0 );
state = 3;
Wakeup( 5.0 );
break;
case 5:
state = 3;
Wakeup( 5.0 );
break;
default:
break;
}
return 0;
}